---
title: 'Notion'
sidebarTitle: 'Notion'
description: 'Access the Notion API in 2 minutes 💨'
---

import { StatusWidget } from "/snippets/api-down-watch/status-widget.jsx"

<StatusWidget service="notion" />

<Tabs>
  <Tab title="🚀 Quickstart">
    <Steps>
      <Step title="Create an integration">
        In Nango ([free signup](https://app.nango.dev)), go to [Integrations](https://app.nango.dev/dev/integrations) -> _Configure New Integration_ -> _Notion_.
      </Step>
      <Step title="Authorize Notion">
        Go to [Connections](https://app.nango.dev/dev/connections) -> _Add Test Connection_ -> _Authorize_, then log in to Notion. Later, you'll let your users do the same directly from your app.
      </Step>
      <Step title="Call the Notion API">
        Let's make your first request to the Notion API (fetch a list of users). Replace the placeholders below with your [secret key](https://app.nango.dev/dev/environment-settings), [integration ID](https://app.nango.dev/dev/integrations), and [connection ID](https://app.nango.dev/dev/connections):
        <Tabs>
            <Tab title="cURL">
                ```bash
                curl "https://api.nango.dev/proxy/v1/users" \
                  -H "Authorization: Bearer <NANGO-SECRET-KEY>" \
                  -H "Provider-Config-Key: <INTEGRATION-ID>" \
                  -H "Connection-Id: <CONNECTION-ID>" \
                ```
            </Tab>

            <Tab title="Node">

            Install Nango's backend SDK with `npm i @nangohq/node`. Then run:

            ```typescript
            import { Nango } from '@nangohq/node';

            const nango = new Nango({ secretKey: '<NANGO-SECRET-KEY>' });

            const res = await nango.get({
              endpoint: '/v1/users',
              providerConfigKey: '<INTEGRATION-ID>',
              connectionId: '<CONNECTION-ID>'
            });

            console.log(JSON.stringify(res.data, 2, null));
            ```
            </Tab>

        </Tabs>

        Or fetch credentials dynamically via the [Node SDK](/reference/sdks/node#get-a-connection-with-credentials) or [API](/reference/api/connection/get).

      </Step>
    </Steps>

    ✅ You're connected! Check the [Logs](https://app.nango.dev/dev/logs) tab in Nango to inspect requests.

    <Tip>
    Next step: [Embed the auth flow](/getting-started/quickstart/embed-in-your-app) in your app to let your users connect their Notion accounts.
    </Tip>
  </Tab>
  <Tab title="🧑‍💻 OAuth app setup">
    <Steps>
      <Step title="Create a Notion account">
        If you don't already have one, sign up for a [Notion account](https://www.notion.so/signup).
      </Step>
      <Step title="Create a new integration">
        1. Go to [My Integrations](https://www.notion.so/my-integrations) in your Notion account.
        2. Click **+ New integration**.
        3. Select **Public** as the integration type, then fill in the integration details. For the **Redirect URIs**, add `https://api.nango.dev/oauth/callback`.
        4. Click **Save**.
      </Step>
      <Step title="Obtain API credentials">
        1. After saving, click **Configure integration settings**.
        2. Under the **Configuration** tab, copy your **OAuth Client ID** and **OAuth Client Secret**. You'll need these when configuring your integration in Nango.
        3. Under the **Capabilities** section, select the [capabilities](https://developers.notion.com/reference/capabilities) your integration requires.
      </Step>
      <Step title="Next">
        Follow the [_Quickstart_](/getting-started/quickstart).
      </Step>
    </Steps>
  </Tab>
  <Tab title="🔗 Useful links">
    | Topic | Links |
    | - | - |
    | General | [Website](https://www.notion.com/) |
    | | [Create a Notion account](https://www.notion.com/signup) |
    | | [My Integrations dashboard](https://www.notion.so/profile/integrations) |
    | Developer | [API documentation](https://developers.notion.com/reference/intro) |
    | | [Developer documentation](https://developers.notion.com/docs/getting-started) |
    | | [Authentication documentation](https://developers.notion.com/docs/authorization) |
    | | [OAuth setup guide](https://developers.notion.com/docs/authorization#public-integration-auth-flow-set-up) |
    | | [How to register an application](https://developers.notion.com/docs/authorization#how-to-make-a-public-integration) |
    | | [API rate limits](https://developers.notion.com/reference/request-limits#rate-limits) |
    | | [API Versioning](https://developers.notion.com/reference/changes-by-version) |

    <Note>Contribute useful links by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/notion.mdx)</Note>
  </Tab>
  <Tab title="🚨 API gotchas">
    - The Notion OAuth API doesn't support refreshing tokens, and so doesn't return a refresh token. The access token never expires.
    - When creating a Notion OAuth app, it is set to **Internal** by default. You need to make it **Public** to initiate an OAuth flow with users. Only then will you be able to obtain the OAuth client ID/secret and register your callback URL.
    - No OAuth scope is required by default for Notion integrations.
    - After authorization, users need to explicitly share specific pages or databases with your integration before you can access them.
    - Notion has [rate limits](https://developers.notion.com/reference/request-limits#rate-limits) that vary by endpoint.
    <Note>Contribute API gotchas by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/notion.mdx)</Note>
  </Tab>
</Tabs>

<Info>
    Questions? Join us in the [Slack community](https://nango.dev/slack).
</Info>
